package com.hw.esay.myExam;

import java.util.Scanner;

//字符串最后一个单词的长度
public class HJ1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNext()){
            String str = scan.nextLine();
            String[] s =str.split(" ");
            System.out.println(s[s.length-1].length());
        }

    }
}
